from selenium import webdriver
from selenium.webdriver.common.by import By
from time import sleep
from options import options
from selenium.webdriver.common.action_chains import ActionChains


driver = webdriver.Chrome(options=options)
driver.get(r'https://www.baidu.com')
driver.maximize_window()
driver.implicitly_wait(30)

#定位元素，上传图片，上传图片绝对路径
driver.find_element(By.CLASS_NAME,'soutu-btn').click()
driver.find_element(By.CLASS_NAME,'upload-pic').send_keys(r'C:\Users\吴思涵\Pictures\WallPaper\image (24).jpg')
sleep(10)

driver.quit()


